/*
 * PlainDuplicateDetector.cc
 *
 *  Created on: Dec 10, 2010
 *      Author: neo
 */

#include "PlainDuplicateDetector.h"

#include "../topping/PlainToppingAlgorithm.h"
#include <ctime>

void PlainDuplicateDetector::log_detector_summary(FILE* log_file) {
  fprintf(log_file, "Plain Detector\n");
  fprintf(log_file, "--Plain similarity measure type = %s\n",
      PlainSimilarityMeasureFactory::get_similarity_measure_type_string(
          this->m_similarity_measure_type).c_str());
}

AbstractToppingAlgorithm* PlainDuplicateDetector::create_topping_algorithm(
    const ReportBuckets& buckets) {
  return new PlainToppingAlgorithm(buckets, this->m_similarity_measure_type);
}

PlainDuplicateDetector::PlainDuplicateDetector(FILE* log_file,
    unsigned top_number, const ReportDataset& report_dataset,
    const unsigned count_to_skip, const vector<IDetectorExtension*>& extensions,
    const enum PlainSimilarityMeasureFactory::SimilarityMeasureType similarity_measure_type,
    const bool detecting_all_reports,
    const IndexingType::EnumIndexingType indexing_type) :
    AbstractDuplicateDetector(log_file, top_number, report_dataset,
        count_to_skip, extensions, detecting_all_reports, indexing_type), m_similarity_measure_type(
        similarity_measure_type) {
}

PlainDuplicateDetector::~PlainDuplicateDetector() {

}

